﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[proc_Customer_Protect_Later_GetList]
(
	@StartIndex int,
	@EndIndex int
)
AS
BEGIN
	;WITH List As(Select ROW_NUMBER() OVER (Order By id Desc) AS Row,
		id,
		[Start_date],
		End_date,
		lrr,
		lrrq,
		ISNULL([Description],'') AS [Description]
		From Customer_Protect_Later

	)
	Select *,(Select Count(0) From list) As RecordCount From list Where Row Between @StartIndex and @EndIndex Order By Row
END
